<ion-header no-border align-title="center">

  <ion-navbar color="primary">
    <ion-title mode="ios">设置入住</ion-title>

    <ion-buttons end class="empty-button">
      <button ion-button >
        <ion-icon></ion-icon>
      </button>
    </ion-buttons>
  </ion-navbar>

</ion-header>

<ion-content padding>
  <div class="address">
    <ion-icon name="pin">
      <span>{{build_address}} - {{room_name}}</span>
    </ion-icon>
  </div>

  <form [formGroup]="checkInForm">
    <ion-list>
      <ion-item>
        <ion-label color="primary" fixed>联系人：</ion-label>
        <ion-input type="text" formControlName="check_in_contact"></ion-input>
      </ion-item>
      <ion-item>
        <ion-label color="primary" fixed>联系电话：</ion-label>
        <ion-input type="number" formControlName="check_in_mobile"></ion-input>
      </ion-item>
      <ion-item>
        <ion-label color="primary" fixed>入住日期：</ion-label>
        <ion-datetime pickerFormat="YYYY MM DD" displayFormat="YYYY-MM-DD" formControlName="check_in_date" max="2020-12-31" cancelText="取消" doneText="确认"></ion-datetime>
      </ion-item>
      <ion-item>
        <ion-label color="primary" fixed>押金：</ion-label>
        <ion-input type="number" formControlName="check_in_deposit"></ion-input>
      </ion-item>
      <ion-item>
        <ion-label color="primary" fixed>租金：</ion-label>
        <ion-input type="number" formControlName="check_in_rent"></ion-input>
      </ion-item>
      <ion-item>
        <ion-label color="primary" fixed>电表读数：</ion-label>
        <ion-input type="number" formControlName="check_in_electricity"></ion-input>
      </ion-item>
      <ion-item>
        <ion-label color="primary" fixed>水表读数：</ion-label>
        <ion-input type="number" formControlName="check_in_water"></ion-input>
      </ion-item>
    </ion-list>
    <ion-grid text-center>
      <ion-row>
        <ion-col>
          <button ion-button class="button-full" (click)="save(checkInForm.value, $event)" [disabled]="!checkInForm.valid">保存</button>
        </ion-col>
      </ion-row>
    </ion-grid>
  </form>
</ion-content>
